export class RoleStorage {
  static KEY = "__AUTH_ROLE_LIST__";

  static setRoleList(value: any[]) {
    localStorage.setItem(this.KEY, JSON.stringify(value));
  }

  static getRoleList() {
    const valueStr = localStorage.getItem(this.KEY) || "[]";
    let roleList = [];
    try {
      roleList = JSON.parse(valueStr);
    } catch (err) {}
    return roleList;
  }
}
